package com.huaxia.dao.A_PV;


import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;


/**
 * @author wangli 爱我华夏，爱我中华！
 * @date 2020/10/22 9:49
 */

public interface PVMapper {

    @Update("update SD_YX_All_PV set NUM=NUM+1 where CREATE_DATE=#{nowDate} ")
    void addPv(@Param("nowDate") String nowDate);

    @Insert("insert into SD_YX_All_PV(CREATE_DATE,NUM) VALUES(#{nowDate},1)")
    void insertNowDate(@Param("nowDate") String nowDate);

    @Select("select nvl(SUM(t.num),0)num from SD_YX_All_PV t ")
    Integer findPv();

    @Select("select t.num from SD_YX_All_PV t where t.CREATE_DATE=#{nowDate}")
    Integer findByNowDate(@Param("nowDate") String nowDate);
}
